﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIAKADCORE.Models
{
    public class Analisis
    {
        #region Constants
        public const int IdLength = 10;
        public const string IdPrefix = "ANL";
        public const string TableName = "[dbo].[analisis]";
        public const string ColumnNameTableIdAnalisis = "[id_analisis]";
        public const string ColumnNameTableIdDetailPertanyaan = "[id_detail_pertanyaan]";
        public const string ColumnTableIdNilaiR = "[id_nilai_r]";
        public const string ColumnTableIsiNilaiValiditas = "[nilai_validitas]";
        public const string ColumnTableIsiNilaiReliabilitas = "[nilai_reliabilitas]";
        public const string ColumnTabelIsiNilaiPengaruh1 = "[nilai_pengaruh1]";
        public const string ColumnTabelIsiNilaiPengaruh2 = "[nilai_pengaruh2]";
        public const string ColumnTabelIsiSkor = "[skor]";
        #endregion

        #region Fields
        private string idAnalisis;
        private string idDetailPertanyaan;
        private string idNilaiR;
        private double isiNilaiValiditas;
        private double isiNilaiReliabilitas;
        private double isiNilaiPengaruh1;
        private double isiNilaiPengaruh2;
        private double isiSkor;
        #endregion 

        #region Properties
        public string IdAnalisis
        {
            get { return this.idAnalisis; }
            set { this.idAnalisis = value; }
        }
        public string IdDetailPertanyaan
        {
            get { return this.idDetailPertanyaan; }
            set { this.idDetailPertanyaan = value; }
        }
        public string IdNilaiR
        {
            get { return this.idNilaiR; }
            set { this.idNilaiR = value; }
        }
        public double IsiNilaiValiditas
        {
            get { return this.isiNilaiValiditas; }
            set { this.isiNilaiValiditas = value; }
        }
        public double IsiNilaiReliabilitas
        {
            get { return this.isiNilaiReliabilitas; }
            set { this.isiNilaiReliabilitas = value; }
        }
        public double IsiNilaiPengaruh1
        {
            get { return this.isiNilaiPengaruh1; }
            set { this.isiNilaiPengaruh1 = value; }
        }
        public double IsiNilaiPengaruh2
        {
            get { return this.isiNilaiPengaruh2; }
            set { this.isiNilaiPengaruh2 = value; }
        }
        public double IsiSkor
        {
            get { return this.isiSkor; }
            set { this.isiSkor = value; }
        }
        #endregion

        #region  Constructors
        public Analisis()
        {
        }
        public Analisis(string idAnalisis, string idDetailPertanyaan, string idNilaiR, double isiNilaiValiditas, double isiNilaiReliabilitas, double isiPengaruh1, double isiPengaruh2, double isiSkor)
        {
            this.idAnalisis = idAnalisis;
            this.idDetailPertanyaan = idDetailPertanyaan;
            this.idNilaiR = idNilaiR;
            this.isiNilaiValiditas = isiNilaiValiditas;
            this.isiNilaiReliabilitas = isiNilaiReliabilitas;
            this.isiNilaiPengaruh1 = isiNilaiPengaruh1;
            this.isiNilaiPengaruh2 = isiNilaiPengaruh2;
            this.isiSkor = isiSkor;
        }
        #endregion
        public override string ToString()
        {
            return string.Format("ID_ANALISIS: {0} | ID_DETAIL_PERTANYAAN: {1} | ID_NILAI_R: {2} | NILAI_VALIDITAS: {3} | NILAI RELIABILITAS: {4} | NILAI_PENGARUH1: {5} | NILAI_PENGARUH2: {6} | NSKOR: {7}", this.idAnalisis, this.idDetailPertanyaan, this.idNilaiR, this.isiNilaiValiditas, this.isiNilaiReliabilitas, this.isiNilaiPengaruh1, this.isiNilaiPengaruh2, this.isiSkor);
        } 
    }
}
